Question: If $f(x)$ and $g(x)$ are polynomials such that $f(x) + g(x) = -2 + x,$ then what is $g(x)$ if $f(x) = x^3 - 2x - 2$?
We substitute $f(x) = x^3 - 2x - 2$ into $f(x) + g(x) = -2 + x$ to find that $(x^3 - 2x - 2) + g(x) = -2 + x.$ Then, $g(x) = -2 + x - (x^3 - 2x - 2).$ Distributing, we find $g(x) = -2 + x - x^3 + 2x + 2 = \boxed{-x^3 + 3x}.$